package com.chexiehui.jc.mvp.mine;

import com.chexiehui.jc.Constants;
import com.chexiehui.jc.base.BaseModel;
import com.chexiehui.jc.base.BaseView;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * @Description 修改密码
 * @Auth SongJun
 * @Date 2019/11/28 18:48
 **/
public interface ChangePasswordCovenant {

    interface View extends BaseView {
         void onSaveSuccess(BaseModel<Object> successResult);
         void onSaveFailure(BaseModel<Object> failureResult);
         String getOldPassword();
         String getNewPassword();
         String getAgainPassword();
    }
    
    interface Stores {
        @FormUrlEncoded
        @POST(Constants.URL_SET_PASSWORD)
        Observable<BaseModel<Object>> save(
                @Field("oldPass") String oldPass,
                @Field("newPass") String newPass);
    }

    interface Presenter {
        void save();
    }

}